Log In  
[back to top]

[ :: Read More :: ]

Cart #18813 | 2016-02-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
39

Here is the first pass at the Pico-8 Flight Simulator in filled and shaded 3D.

Explore an expansive, mountainous world and avoid crashing.
(Simulation might be a stretch, as nothing about the aircraft physics is actually modeled... but you have to start somewhere.)

Controls:
Left / Right Arrow: Turn
Up / Down Arrow: Increase / Decrease Pitch

I was feeling down about the frame rate, but then I looked at videos of flight simulators from the late 80's and early 90's and that made me feel better :-D.

Changes:
--Fixed movement bug

Next tasks:
--Cockpit graphics
--More varied terrain
--Some sort of goal (perhaps travel from airport to airport and land... like a real flight sim...)

-Electric Gryphon

P#18808 2016-02-13 14:39 ( Edited 2018-08-25 18:35)

[ :: Read More :: ]

Cart #18677 | 2016-02-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
9

This is a stepping stone to an overly-ambitious project.

I'm looking for a better way to sort a table of triangles--currently sorting speed for around 150 triangles is preventing me from having solid filled triangles.

Does anyone have a good quicksort implementation that could sort a list of triangles, where each triangle contains 3 points and a centroid "z" value?

triangle_list={}
function    new_triangle(p1,p2,p3,z,color)
    t={}
    t.p1=p1
    t.p2=p2
    t.p3=p3
    t.z=z
    t.color=color
    add(triangle_list,t)
end

function sort_by_z()
 ...
end

That said, I actually like the way that the wire-frame looks, and backface culling almost makes hills appear opaque.

P#18678 2016-02-06 21:34 ( Edited 2016-02-23 18:37)

[ :: Read More :: ]

Cart #18572 | 2016-02-01 | Code ▽ | Embed ▽ | No License
25

I'm playing with lighting effects to create a more moody atmosphere. Frame rate just isn't quite up to snuff though.

P#18573 2016-02-01 11:36 ( Edited 2016-06-16 00:19)

[ :: Read More :: ]

Cart #18391 | 2016-01-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
81

Old version:


Cart #18356 | 2016-01-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
81

Cart #18343 | 2016-01-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
81

Cart #18137 | 2016-01-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
81


It's a complete game now, with a title screen and a final boss.

--Arrow keys to move
--Z-key to fire
--X-key to strafe

Defeat the Star Beast on level three!
You start in the elevator. Use the Z key at the console to go up one floor, provided you have destroyed all robots and collected the keycard, which is hidden in the level.

--This is inspired by AfBu's 3D experiment, as well as Lode's Computer Graphics Tutorial on ray-casting, which uses a different stepping method than AfBu. (http://lodev.org/cgtutor/raycasting.html)
--Horizontal distortion effect borrowed from qbicfeet

P#18138 2016-01-04 01:07 ( Edited 2016-06-01 02:52)

[ :: Read More :: ]

Cart #picokart2_082-0 | 2019-09-23 | Code ▽ | Embed ▽ | No License
93

Old versions:

Cart #17953 | 2015-12-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
93


Cart #17738 | 2015-12-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
93

Compete in a 3D, high-speed go-cart race against computer-controlled mouse opponents in three challenging tracks.

New Features:
--Improved screen size and resolution
--Music from Gruber

P#17739 2015-12-12 21:56 ( Edited 2019-09-23 05:17)

[ :: Read More :: ]


This is a first attempt to render textured height maps in something close to real time. I guess these would be considered voxels?

I am casting rays from the screen and checking intersect with the floor plane to get an x,z coordinate. Then I load a pixel from the map for the color and a pixel from the map at an offset location to get a height value.

A neat feature is that shadows could be baked into the texture.

Code is ugly, buggy, and poorly optimized...

Issues:
--In order to keep the frame rate up while moving, I had to double pixel size.
--Looking up a pixel on the map is very slow, but I want to be able to handle 512x512 height maps and this is the best way I can think of. (512x512 color map and 512x512 height map)
--tall vertical walls jump in and out of existence, especially when at a distance. Actually, this happens with all pixels. Rounding errors perhaps?

I'm going to look at Zep's Raycast demo and see if there is anything in there that I can borrow.

-ElectricGryphon

P#17537 2015-12-05 20:19 ( Edited 2016-02-02 20:18)

[ :: Read More :: ]

Cart #17113 | 2015-11-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
10

Old version:

Cart #17074 | 2015-11-26 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
10

It's a confetti factory simulation! (This is shamelessly inspired by an old AfterDark screensaver that I recall.)

Hit 'Z' to open or close valves.
Hit 'X' to change direction of conveyors.
Try to get the confetti into the correctly colored out bin in order to advance to the next level. Mixed confetti will reduce your score because it's really hard to sort after the fact.

-Electric Gryphon

P#17075 2015-11-26 15:08 ( Edited 2015-11-28 00:50)

[ :: Read More :: ]

Cart #17015 | 2015-11-25 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
13

Old version:



Cart #17008 | 2015-11-25 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
13


Cart #16914 | 2015-11-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
13



I was inspired to start playing with wave physics.

-Electric Gryphon

P#16915 2015-11-23 10:55 ( Edited 2015-11-29 08:49)

[ :: Read More :: ]

Cart #16895 | 2015-11-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

Hit Z to change the scene. Don't forget to mop up afterwards.

-Electric Gryphon

P#16896 2015-11-22 19:13 ( Edited 2015-11-23 00:13)

[ :: Read More :: ]


the scent of wet fur
huddled close in the dark storm
fine red umbrella

-Electric Gryphon

P#16887 2015-11-22 13:42 ( Edited 2017-09-13 19:29)

[ :: Read More :: ]

Cart #16380 | 2015-11-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
11

Well, it's a 3D kinda week on the pico8.

This is a demo of an SNES-style mode-7 engine that renders a perspective view of the map, like the old Final Fantasy games.

Right now, drawing the map is using about 70% of the CPU cycle, so it could definitely use some optimization to leave space for other things like billboard sprites and the like. Reach goal would be to add MIP mapping so that closer scenery would have more detail and further away scenery would be less prone to sparkle.

-Electric Gryphon

P#16381 2015-11-07 19:07 ( Edited 2015-11-11 03:58)

[ :: Read More :: ]

Cart #16020 | 2015-10-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
18

It was a pleasant Sunday morning drive in the mountains until a volcanic eruption happened to ruin everything.
Race home along the winding roads, swerving to avoid the slow and the doomed, just seconds ahead of a molten stream of lava.
Maybe if you can drive through the night and into the next day, you will be safe.

Keep the hammer down to avoid a fiery death, but don't skid out on curves or crash into the other motorists.

Up: Drive
Down: Break

v 1.0
This cartridge is feature complete, though it could use some better sound and, of course, some music.

-Electric Gryphon

P#15719 2015-10-22 10:59 ( Edited 2015-10-31 04:48)

[ :: Read More :: ]

Cart #15569 | 2015-10-19 | Code ▽ | Embed ▽ | No License
8

This is a random assortment of drawings that I have made as a proof of concept.

Hit Z to see the next picture.

Images are stored as strings, as saved by the Canvas Drawing Program.
I will follow up with a post on how to export images from one to the other.

Code by itself is 1892/8192 tokens.
Data for scenes will count against Program Chars and Compressed size.
For 6 scenes, Program chars: 21530/32768, Compressed size 11931/15360

Please feel free to use the code here for your own use.

-ElectricGryphon

P#15573 2015-10-19 02:37 ( Edited 2015-10-19 17:54)

[ :: Read More :: ]


This is an prototype for a vector drawing program in pico-8.

Controls:

Arrow keys: Move cursor
Z: Add point / Select polygon
X: Toggle cursor speed (Normal, Fast, Slow)
Tab: Hide menu
Q: Hide cursor

Double click "NEW" to clear the image and start a new drawing.

To save image:
--Picture Only:
--Hit tab to hide menu
--Hit q to hide cursor
--Screenshot to desktop with F1 key
--Full Scene (into ROM):
--Double click SAV button
--Hit escape to exit cartridge
--Ctrl S to save cartridge
--(This is bit of a hack)

New in V0. 88
--fixed the bug with black shapes
--added save function (exports poly list to sprite-sheet. Poly compression is simple 1 byte per value
--added select function
--Click SEL to enter selection mode
--Selected polygons can be re-colored or deleted
--added delete function
--drawing acceleration:
--accelerate drawing solid color polygons by just using line command instead of pattern/bplot.
--store edge list in poly so that we don't recalc every time
--don't redraw all the polygons when we add a new one. removes flicker when drawing complex scenes.
--x button switches the speed of the cursor (slow, medium, and fast) this allows for "pixel perfect" drawing.
--cursor changes color so that it stands out against whatever is behind it
--drawing lines change color so that they match the current foreground

Bugs:
--Export clobbers save

-ElectricGryphon

P#15261 2015-10-11 04:58 ( Edited 2015-10-29 18:08)

[ :: Read More :: ]

Hi,

I've written a bubble-sort function snippet, which might be helpful for others.

Function takes a list as an argument, and directly modifies that list.

Pico-8 treats the first index as 1 as opposed to 0, so a lot of standard code snippets have to be tweaked to work. Please correct if you see any errors or ways to increase efficiency.

-ElectricGryphon

function bsort(list)
 local i
 local j
 local temp
 local swapped = false

 local n=len(list)

 --problems with 1 based index

 for i=1,n
  do
   swapped = false
   for j=2,n-i+1
     do
     if( list[j]<list[j-1])
      then
       temp=list[j]
       list[j]=list[j-1]
       list[j-1]=temp
       swapped = true
      end
    end
    if(swapped==false)then  return end
  end
end 
P#14709 2015-09-28 11:36 ( Edited 2015-09-28 17:04)

[ :: Read More :: ]


This is my first game on the Pico-8, and, to be honest, the first game that I have "polished" to this level.

Goal:
Explore a hazard-filled cave, collect all of the treasure, and then escape through the elevator hidden in the depths.

Controls:
Left and Right to move.
Up to jump.

Game:
As befits a normal human going against skeletons, slime creatures, and demonic bats, you are completely defenseless and can only shrug off damage that comes your way. Luckily, the intelligence of said critters is meager at best, so it is possible to avoid coming into contact with them.

Let me know what you think.

Thanks,
ElectricGryphon

Notes:
Bat flying behavior has some bugs.
Camera movement shows occasional jerkiness.
Needs play-testing and probably more variety in regards to room / trap types.

P#14486 2015-09-22 12:26 ( Edited 2015-09-23 14:03)